package sv.gob.mh.dgii.model;

// Generated Dec 10, 2007 4:52:21 PM by Hibernate Tools 3.2.0.beta7

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * IeFuenteDet generated by hbm2java
 */
@Entity
@Table(name = "IE_FUENTE_DET", schema = "UPET", uniqueConstraints = {})
public class IeFuenteDet implements java.io.Serializable {

	// Fields    

	/**
	 * 
	 */
	private static final long serialVersionUID = -3440339431975364826L;

	private Long ifuenteDet;

	private TbEstado tbEstado;

	private IeSolicitud ieSolicitud;

	private RcRuc rcRuc;

	private Date ffecfin;

	private String cusuario;

	private Date fhingreso;

	private Set<IeInformante> ieInformantes = new HashSet<IeInformante>(0);

	private Set<IeFuenteDoc> ieFuenteDocs = new HashSet<IeFuenteDoc>(0);

	// Constructors

	/** default constructor */
	public IeFuenteDet() {
	}
	public IeFuenteDet(Long ifuenteDet) {
		this.ifuenteDet = ifuenteDet;
	}

	/** minimal constructor */
	public IeFuenteDet(Long ifuenteDet, RcRuc rcRuc) {
		this.ifuenteDet = ifuenteDet;
		this.rcRuc = rcRuc;
	}

	/** full constructor */
	public IeFuenteDet(Long ifuenteDet, TbEstado tbEstado,
			IeSolicitud ieSolicitud, RcRuc rcRuc, Date ffecfin,
			String cusuario, Date fhingreso, Set<IeInformante> ieInformantes,
			Set<IeFuenteDoc> ieFuenteDocs) {
		this.ifuenteDet = ifuenteDet;
		this.tbEstado = tbEstado;
		this.ieSolicitud = ieSolicitud;
		this.rcRuc = rcRuc;
		this.ffecfin = ffecfin;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.ieInformantes = ieInformantes;
		this.ieFuenteDocs = ieFuenteDocs;
	}

	// Property accessors
	@Id
	@Column(name = "I_FUENTE_DET", unique = true, nullable = false, insertable = true, updatable = true, precision = 10, scale = 0)
	public Long getIfuenteDet() {
		return this.ifuenteDet;
	}

	public void setIfuenteDet(Long ifuenteDet) {
		this.ifuenteDet = ifuenteDet;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "M_ESTADO", unique = false, nullable = true, insertable = true, updatable = true)
	public TbEstado getTbEstado() {
		return this.tbEstado;
	}

	public void setTbEstado(TbEstado tbEstado) {
		this.tbEstado = tbEstado;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "I_SOLICITUD", unique = false, nullable = true, insertable = true, updatable = true)
	public IeSolicitud getIeSolicitud() {
		return this.ieSolicitud;
	}

	public void setIeSolicitud(IeSolicitud ieSolicitud) {
		this.ieSolicitud = ieSolicitud;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT", unique = false, nullable = false, insertable = true, updatable = true)
	public RcRuc getRcRuc() {
		return this.rcRuc;
	}

	public void setRcRuc(RcRuc rcRuc) {
		this.rcRuc = rcRuc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "F_FECFIN", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFfecfin() {
		return this.ffecfin;
	}

	public void setFfecfin(Date ffecfin) {
		this.ffecfin = ffecfin;
	}

	@Column(name = "C_USUARIO", unique = false, nullable = true, insertable = true, updatable = true, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@OneToMany( fetch = FetchType.LAZY, mappedBy = "ieFuenteDet")
	public Set<IeInformante> getIeInformantes() {
		return this.ieInformantes;
	}

	public void setIeInformantes(Set<IeInformante> ieInformantes) {
		this.ieInformantes = ieInformantes;
	}

	@OneToMany( fetch = FetchType.LAZY, mappedBy = "ieFuenteDet")
	public Set<IeFuenteDoc> getIeFuenteDocs() {
		return this.ieFuenteDocs;
	}

	public void setIeFuenteDocs(Set<IeFuenteDoc> ieFuenteDocs) {
		this.ieFuenteDocs = ieFuenteDocs;
	}

}
